﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlSideLst.ascx.cs" Inherits="Ctl_ctlSideLst" %>
<script language="javascript" src="Scripts/Tools.js" text/javascript"> </script>            
<%--<script language="javascript">
    function OnDeleteClick() {
        return confirm('Удалить запись?');
    }

</script>--%>


<table cellpadding="2" cellspacing="0" width=<%#GetBoxWidth() %>>
    <tr id=Tr2 runat="server">
                
                <td class="grd_td_head">
                    <asp:Panel runat ="server" ID ="pnlHeadBox" >
                    <table cellpadding="0" cellspacing="0" width="100%">
                        <tr>   
                            <td style="width :17px">
                                &nbsp
                            </td>                                                 
                            <td style="width :17px">
                                &nbsp
                            </td>
                            <td style="width :17px; text-align :left ">
                                &nbsp
                            </td>
                            <td style="width :100px">
                                <asp:LinkButton ID=GID runat="server" OnClick ="lvSort" CommandArgument ="FullGID" >GID</asp:LinkButton>
                                <asp:Label ID="lbFullGID" runat="server"  CssClass =<%# GetHeadCss("FullGID") %>  Text="&nbsp&nbsp&nbsp"></asp:Label>                                                
                            </td>
                            <td style=<%# Get_TdStyle_Constraction() %> >
                               <asp:LinkButton ID=LinkButton1 runat="server" OnClick ="lvSort" CommandArgument ="ConstractionTypeName" >Носитель</asp:LinkButton>
                               <asp:Label ID="lbConstractionTypeName" runat="server"  CssClass =<%# GetHeadCss("ConstractionTypeName") %>  Text="&nbsp&nbsp&nbsp"></asp:Label>                                                
                            </td>
                            <td style="text-align :left;width :5px ">
                                &nbsp;
                            </td>
                            <td style=<%# Get_TdStyle_Constraction() %> >
                                <asp:LinkButton ID=LinkButton2 runat="server" OnClick ="lvSort" CommandArgument ="FullAdress" >Адрес</asp:LinkButton>
                               <asp:Label ID="lbFullAdress" runat="server"  CssClass =<%# GetHeadCss("FullAdress") %>  Text="&nbsp&nbsp&nbsp"></asp:Label>                                                
                                
                            </td>
                            <td style="text-align :left;width :5px ">
                                &nbsp;
                            </td>
                            <td style="text-align :left;width :5px ">
                                &nbsp;
                            </td>
                            <td style="width :50px; text-align :left">
                                <asp:LinkButton ID=LinkButton4 runat="server" OnClick ="lvSort" CommandArgument ="GRP" >GRP</asp:LinkButton>
                                <asp:Label ID="Label1" runat="server"  CssClass =<%# GetHeadCss("GRP") %>  Text="&nbsp&nbsp&nbsp"></asp:Label>                                                

                            </td>
                            <td style="width :20px;text-align :left">
                                <asp:ImageButton ID=ImageButton5 runat="server" ToolTip ="Ограничения" ImageUrl="~/images/conditions.png" /> 
                            </td>
                            <td style="width :20px; text-align :left">
                                <asp:ImageButton ID=ImageButton2 runat="server" ToolTip ="Подсветка" ImageUrl="~/images/lamp.png" /> 
                            </td>
                            <td   style="width :60px;text-align :left">
                                <asp:LinkButton ID=LinkButton5 runat="server" OnClick ="lvSort" CommandArgument ="Price" >Цена</asp:LinkButton>
                                <asp:Label ID="Label2" runat="server"  CssClass =<%# GetHeadCss("Price") %>  Text="&nbsp&nbsp&nbsp"></asp:Label>                                                
                            </td>
                            <td style=<%# GetSheduleStyle() %>>
                                <asp:Panel runat ="server" Width ="100%" Visible =<%# ShowShedule  %> >                                
                                    <table width ="100%" >
                                    <tr >
                                    <td class="style8">
                                    &nbsp
                                    </td> 
                                    <td class="style6">
                                        <asp:DropDownList  Width="70px" ID=DropDownList1 runat="server">
                                        <asp:ListItem >Январь</asp:ListItem>
                                            <asp:ListItem>Февраль</asp:ListItem>
                                            <asp:ListItem>Март</asp:ListItem>
                                        </asp:DropDownList> 
                                    </td>
                                        <td class="style3">
                                            -</td>
                                    <td class="style7">
                                        <asp:DropDownList ID=DropDownList2 runat="server" Width="71px">
                                            <asp:ListItem>Январь</asp:ListItem>
                                            <asp:ListItem>Февраль</asp:ListItem>
                                            <asp:ListItem>Март</asp:ListItem>
                                        </asp:DropDownList> 
                                    </td>
                                    <td class="style5" style="text-align: center">                                        
                                        &nbsp;Размерность:&nbsp;</td>
                                    <td>
                                        <asp:DropDownList  ID=DropDownList3 runat="server" Width="82px">
                                            <asp:ListItem>Месяц</asp:ListItem>
                                            <asp:ListItem>Неделя</asp:ListItem>
                                            <asp:ListItem>День</asp:ListItem>
                                        </asp:DropDownList> 
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                    </tr>
                                </table>
                               </asp:Panel> 
                            </td>
                        </tr>
                    </table>
                    </asp:Panel>
                </td>
</tr> 
    <tr id=Tr3 runat="server">
                <td>
                    <table cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                             <td style="width :17px">
                                <%# GetNBSP() %>
                            </td>                   
                            <td style="width :17px">
                                <%# GetNBSP() %>
                            </td>
                            <td style="width :17px; text-align :left ">
                                <%# GetNBSP() %>
                            </td>
                            <td style="width :100px">
                                <%# GetNBSP() %>
                                </td>
                            <td style=<%# Get_TdStyle_Constraction() %> >
                                    <%# GetNBSP() %>
                            </td>
                            <td style="text-align :left;width :5px ">
                                <%# GetNBSP() %>
                            </td>
                            <td style=<%# Get_TdStyle_Constraction() %> >
                                <%# GetNBSP() %>
                            </td>
                            <td style="text-align :left;width :5px ">
                                <%# GetNBSP() %>
                            </td>
                            <td style="text-align :left;width :5px ">
                                <%# GetNBSP() %>
                            </td>
                            <td style="width :50px; text-align :left">
                                <%# GetNBSP() %>
                            </td>
                            <td style="width :20px;text-align :left">
                                <%# GetNBSP() %>
                            </td>
                            <td style="width :20px; text-align :left">
                                <%# GetNBSP() %>
                            </td>
                            <td style="width :50px;text-align :right">
                                <%# GetNBSP() %>
                            </td>
                            <td style=<%# GetSheduleStyle() %>>
                                <table width="100%">
                                    <asp:ListView ID="lvHeadSideItem" runat="server" >
                                    <LayoutTemplate>            
                                    <tr ID="itemPlaceholder" runat="server">
                                    </tr>
                                    </LayoutTemplate>        
                                    <ItemTemplate >
                                        <tr>
                                        <td style ="text-align:center; font-weight:bold">
                                            11.2009
                                        </td>
                                        <td style ="text-align:center; font-weight:bold" >
                                            12.2009
                                        </td>
                                        <td style ="text-align:center; font-weight:bold" >
                                            01.2010
                                        </td >
                                        <td style ="text-align:center; font-weight:bold" >
                                            01.2011
                                        </td>
                                    </tr>
                                    </ItemTemplate>
                                    </asp:ListView>
                                  </table>
                            </td>
                        </tr>
                    </table>
                </td>
</tr> 
    <asp:ListView ID="lvSides" runat="server" 
        onpagepropertieschanged="lvSides_PagePropertiesChanged" 
        onitemdatabound="lvSides_ItemDataBound">                       
        <LayoutTemplate>                
            </tr>
            <tr ID="itemPlaceholder" runat="server">
            </tr>
        </LayoutTemplate>
        <ItemTemplate>
            <tr ID="Tr1" runat="server">                
                <td   class=<%# GetSelectStyle((string) Eval("ID") ) %>  onmouseout="GrdItemOnMouseOut(this);" onmouseover="GrdItemOnMouseOver(this);">
                    <table cellpadding="0" cellspacing="0" width="100%">
                        <tr>     
                            <td style="width :17px">
                                <asp:ImageButton ID=btnRemoveRecord OnClientClick ="OnDeleteClick();" CommandArgument =<%# (string) Eval("ID") %>  OnClick ="SelListRemove" ImageUrl ="~/images/trash.png" Visible =<%# !EditMode %> runat="server" />
                            </td>                   
                            <td style="width :17px">
                                <asp:CheckBox ID="chSelected" AutoPostBack ="true"  CssClass=<%# (string) Eval("ID") %>  runat="server"  OnCheckedChanged="chSel_CheckedChanged"   Checked=<%# ItemIsSelected ((string)Eval ("Side.ID")) %>  Visible =<%# EditMode %>  />
                            </td>                   
                            <td style="width :17px">
                                <asp:ImageButton ID="ImageButton2" runat="server" CommandName="Edit" 
                                    ImageUrl="~/images/grd_plus.gif" />
                            </td>
                            <td style="width :17px; text-align :left ">
                                 <asp:LinkButton OnClientClick =<%# OnFullSizeClick((string)Eval("Side.ID")) %> ID=LinkButton1 runat="server">   <%# Eval ("Side.Litera")%></asp:LinkButton>
                                 
                            </td>
                            <td style="width :100px">                                         
                                <%# (string)Eval("grdConstraction.Constraction.GID")%>                                                       
                            </td>
                            <td style=<%# Get_TdStyle_Constraction() %> >
                                    <%# (string)Eval("grdConstraction.ConstractionTypeName")%>
                            </td>
                            <td style="text-align :left;width :5px ">
                                &nbsp;
                            </td>
                            <td style=<%# Get_TdStyle_Constraction() %> >
                                    <%# (string)Eval("grdConstraction.FullAdress")%>
                            </td>
                            <td style="text-align :left;width :5px ">
                                &nbsp;
                            </td>
                            <td style="text-align :left;width :5px ">
                                &nbsp;
                            </td>
                            <td style="width :50px; text-align :left">
                                <%# Convert.ToString(Eval("Side.GRP"))%>
                            </td>
                            <td style="width :20px;text-align :left">
                                <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/images/galka.gif" Visible='<%# Eval("grdConstraction.isCondition") %>' />
                            </td>
                            <td style="width :20px; text-align :left">
                                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/galka.gif" Visible='<%# Eval("grdConstraction.Light") %>' />
                            </td>
                            <td style="width :60px;text-align :right">
                                    <%# Convert.ToString(Eval("Side.CurrentPrice"))%>               
                            </td>
                            <td style=<%# GetSheduleStyle() %>>
                                <table width="100%">
                                    <asp:ListView ID="lvSideItem" runat="server" >
                                    <LayoutTemplate>            
                                    <tr ID="itemPlaceholder" runat="server">
                                    </tr>
                                    </LayoutTemplate>        
                                    <ItemTemplate >
                                        <tr>
                                        <td class="Ocuppated_Cell">
                                            &nbsp;
                                        </td>
                                        <td class="Vacant_Cell">
                                            &nbsp;
                                        </td>
                                        <td class="Vacant_Cell">
                                            &nbsp;
                                        </td>
                                        <td class="Vacant_Cell">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    </ItemTemplate>
                                    </asp:ListView>
                                  </table>                                 
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
</table>

<asp:DataPager ID="DataPager" runat="server" EnableViewState="true" 
    PagedControlID="lvSides" PageSize=15 >
    <Fields>
        <asp:NumericPagerField ButtonCount="5" ButtonType="Link" NextPageText="--&gt;" 
            PreviousPageText="&lt;--" />
        <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="true" 
            ShowLastPageButton="true" ShowNextPageButton="true" 
            ShowPreviousPageButton="true" />
    </Fields>
</asp:DataPager>
<asp:HiddenField ID="hfShowShedule" runat="server" Value="1" />
<asp:HiddenField ID="hfSideLstState" runat="server" Value="1" />
<asp:HiddenField ID="hfPref" Value ="SideList" runat="server" />





 








 



